<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="gutianyang">
		<title>手续费管理</title>
		<script language="javascript" src="../script/common.js" type="text/javascript"></script>
		<script language="javascript" src="../script/core/mootools.js" type="text/javascript"></script>
		<script language="javascript" src="../script/rule/rulemgnt.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript">
			//全局变量
			RuleMgnt.ruleType = RuleType.CARDFEE
			RuleMgnt.editPage = "/basic/fee_rule_edit.html"
			//页面加载方法
			RuleMgnt.mainJudgeSearch = "<label>业务类别</label> <select name=mainJudge ><option></option></select>"
			
			var businessTypes = DWR.syncCall("feeService.findFeeTypes");
			RuleMgnt.mainJudgeSearchFunc = function(form){
				Common.initDict(form.mainJudge,businessTypes,"全 部","id","name");
			}
			
			
			RuleMgnt.mainJudgeEdit = RuleMgnt.mainJudgeSearch
			RuleMgnt.mainJudgeEditFunc = function(form){
				Common.initDict(form.mainJudge,businessTypes,null,"id","name");
			}
			
		
			RuleMgnt.defResultEdit = "<label>金&nbsp;&nbsp;&nbsp;&nbsp;额</label> "
								+"<input type=text name=amount maxlength=20 onblur=checkV(this,'amount',true)> 元<span class=des>*</span>"
					
			RuleMgnt.beforeSave = function(){
				var form = RuleMgnt.getEditForm()
            	if (!checkForm(form)) return -1;
				
				var result = {amount:form.amount.value}
				if (!result.amount)
				{
					showInformation("需要输入金额")
					return -1
				}
				
				result.amount = Format.yuanToFen(result.amount)
					
				return result
			}
			
			RuleMgnt.beforeEdit = function(ruletSet){
				if (ruletSet.defResult){
					var form = RuleMgnt.getEditForm()
					var defR = ruletSet.defResult
					if (defR.amount){
						form.amount.value = Format.fenToYuan(defR.amount)
					}
				}
			}
			function load(){
				Eui.showNavigation();
		 		RuleMgnt.createViews('content')
		 		
			}
			
			
		</script>
	</head>
	<body onload="load()">
		<!--页面导航-->
		<div class="nav"><div id="nav">&nbsp;</div></div>

		<div id="content"></div>
	</body>
</html>